<?

/* --|	SEARCH
  Software: Socially
  Version: 1.0
  Contact: http://socially.googlecode.com
  Info: http://socially.googlecode.com
  Support: http://socially.googlecode.com
  --------------------------------------------------------------------------
  Author: goker.cebeci | http://gokercebeci.com
  --------------------------------------------------------------------------
  License: Distributed under the GNU General Public License (GPL)
  http://www.gnu.org/licenses/gpl.html
  This program is distributed in the hope that it will be useful - WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.
  ------------------------------------------------------------------------- */

class search {

    public static function get($app, $a) {
        $a['limit'] = $a['limit'] ? ($a['limit'] > 50 ? 50 : $a['limit']) : 10;
        $a['page'] = $a['page'] ? $a['page'] : 1;
        if (method_exists($app, 'search')) {
            $r = $app::search($a);
            $r->app = $app;
            //$q = explode('?' . $app, $_SERVER['REQUEST_URI']);
            //$q = explode('&page', $q[1]);
            $r->link = '/' . APP . '/' . $app . '?q=' . $a['q'] . '&page=';
        }
        return $r;
    }

    public static function onlines($a) {
        $a['limit'] = $a['limit'] ? ($a['limit'] > 50 ? 50 : $a['limit']) : 10;
        $a['page'] = $a['page'] ? $a['page'] : 1;
        return profile::onlines($a);
    }

    public static function allmembers($a) {
        return self::get('profile', $a);
    }

    public static function sitemap() {
        
    }

}

?>